<template>
	<view class="container">
		<view class="main">
			<view class="list flex flex-align flex-bt">
				<input type="text" placeholder="请输入推荐人邀请码" v-model="nickname" >
			</view>
		</view>
		<view class="btn  baocun hei" @click="postData">保存</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				nickname:'',
				
			}
		},
		onLoad() {
		},
		methods: {
			postData(){
				let that = this
				let data ={inviter_code:that.nickname}
				
				console.log(data)
				that.tui.request("api.auth.nutrition/blind", "PUT",data , false, true, false).then((res) => {
					
					that.tui.toast(res.info)
					if(res.code==1){
						setTimeout(()=>{
							uni.navigateBack()
						},1500)
					}
					
				}).catch((res) => {})
			},
		}
	}
</script>

<style lang="scss">
	page{background: #f5f5f5;padding-top: 30rpx;}
	.grey{color: #b3b3b3;}
	.main{padding: 0 40rpx;background: #fff;
		.list{border-bottom: 1px solid #eee;height: 100rpx;
			input{font-size: 26rpx;}
		}
		.list:last-child{border-bottom: none;}
	}
	.wenzi{padding:20rpx 30rpx;}
	.baocun{margin: 160rpx 30rpx 0;border-radius: 6rpx;}
	.btn{background: #bbe68c;color: #fff;text-align: center;line-height: 90rpx;}
</style>